# project
cmake_minimum_required(VERSION 2.8.8)

set(TARGET vcd-usb)

project(${TARGET})

include_directories(
    ../
    ../vcd-common-api
)

#aux_source_directory( ../vcd-common-api SRC_DIR)
aux_source_directory( ../vcd-common-api/vcd-conf SRC_DIR)
aux_source_directory( ../vcd-common-api/easylog SRC_DIR)
aux_source_directory( ../vcd-common-api/vcd-topbar SRC_DIR)
set(VCD_USB_SRC
    ../vcd-common-api/vcd-usb-redir.c
    ../vcd-common-api/vcd-log.c
    ../vcd-linux-ui/vcd-window-timed-revealer.c
    vcd-usb-network.c
)

IF(WIN32)
set(VCD_USB_SRC ${VCD_USB_SRC} ../logo.rc)
ENDIF()

# target
add_executable(${TARGET} vcd-usb-main.c ${VCD_USB_SRC} ${SRC_DIR})

IF(WIN32)
    target_link_libraries(${TARGET} ${COMMON_LIBS} ${VCD_LINK_WIN32_LIB})
ELSEIF(UNIX)
    target_link_libraries(${TARGET} ${COMMON_LIBS} ${VCD_LINK_LINUX_LIB})
ELSE()
    target_link_libraries(${TARGET} ${COMMON_LIBS})
ENDIF()
